#include "HiranipraShared.h"

#include "HCM/IComponent.h"
#include "Platform/IO/IFileStream.h"

#ifndef _SHARED_PLATFORM_GRAPHICS_IPROGRAMLOADER_H_
#define _SHARED_PLATFORM_GRAPHICS_IPROGRAMLOADER_H_

namespace Hiranipra {
	namespace Platform {
		namespace Graphics {

			enum ShaderCompileOptions
			{
				ShaderCompileDefault = 0,
			};
			enum ProgramLinkOptions
			{
				ProgramLinkDefault = 0,
			};

			class IProgramLoader : implements RefInstance
			{
			public:
				virtual ~IProgramLoader(){}

				virtual IVertexShader* CompileVertexShader( IO::IFileStream& stream, const ShaderCompileOptions options = ShaderCompileDefault ) = 0;
				virtual IVertexShader* CompileVertexShader( const wstring& source, const ShaderCompileOptions options = ShaderCompileDefault ) = 0;
				
				virtual IPixelShader* CompilePixelShader( IO::IFileStream& stream, const ShaderCompileOptions options = ShaderCompileDefault ) = 0;
				virtual IPixelShader* CompilePixelShader( const wstring& source, const ShaderCompileOptions options = ShaderCompileDefault ) = 0;
				
				virtual IGraphicsProgram* CompileProgram( IO::IFileStream& stream, const ShaderCompileOptions options = ShaderCompileDefault ) = 0;
				virtual IGraphicsProgram* CompileProgram( const wstring& source, const ShaderCompileOptions options = ShaderCompileDefault ) = 0;
				
				virtual IGraphicsProgram* LinkProgram( IVertexShader* vertexShader, IPixelShader* pixelShader, const ProgramLinkOptions = ProgramLinkDefault ) = 0;
			};

		}
	}
}

#endif // _SHARED_PLATFORM_GRAPHICS_IPROGRAMLOADER_H_
